﻿/**
 * @file PhyscisPropBeamWapper.h
 * @brief 梁物理属性 相关的python接口
 * @author wangning (2185896382@qq.com)
 * @date 2024-12-03
 */
#ifndef _PY_SEA_PHYSCISPROPBeam_WAPPER_H___
#define _PY_SEA_PHYSCISPROPBeam_WAPPER_H___

#include <QString>
#include <QObject>
#include "PythonInterfaceAPI.h"
#include "FITK_Component/FITKAcousticsPhysics/PyFITKPhyscisPropBeam.h"

class Beam : public Acoustics::PyFITKPhyscisPropBeam
{
public:
    explicit Beam(const QString& name);
    explicit Beam();
    virtual ~Beam() = default;
};

/**
 * @brief  梁物理属性相关PYTHON接口装饰
 * @author wangning (2185896382@qq.com)
 * @date 2024-12-03
 */
class PythonInterfaceAPI PhyscisPropBeamWapper : public QObject
{
    Q_OBJECT
public slots:
    Beam* new_Beam();

    void delete_Beam(Beam* obj);
    /**
     * @brief 在Python解释器中通过名称获取对象
     * @author wangning (2185896382@qq.com)
     * @date 2024-12-03
     */
    Beam* static_Beam_GetBeam(const QString& name);
    /**
     * @brief 获取名称
     * @author wangning (2185896382@qq.com)
     * @date 2024-12-03
     */
    QString getName(Beam* obj);
    /**
     * @brief 设置名称
     * @author wangning (2185896382@qq.com)
     * @date 2024-12-03
     */
    void setName(Beam* obj, const QString& name);
    /**
     * @brief   设置惯性矩
     * @param[i] Ixx:截面惯性矩x
     * @param[i] Iyy:截面惯性矩y
     * @param[i] Jzz:截面极惯性矩
     * @param[i] Qzz:扭转常数
     * @author wangning (2185896382@qq.com)
     * @date   2024-12-03
     */
    void setMoments(Beam* obj, double Ixx, double Iyy, double Jzz, double Qzz);
    /**
     * @brief  设置截面属性
     * @param[i] area:面积
     * @param[i] perimeter:周长
     * @author wangning (2185896382@qq.com)
     * @date   2024-12-03
     */
    void setCrossSection(Beam* obj, double area, double perimeter);
    /**
     * @brief  设置剪切中心偏移量
     * @param[i] ShearOffsetX:剪心偏移x
     * @param[i] ShearOffsetY:剪心偏移y
     * @author wangning (2185896382@qq.com)
     * @date   2024-12-03
     */
    void setShearCenterOffset(Beam* obj, double ShearOffsetX, double ShearOffsetY);
    /**
     * @brief  设置材料
     * @param[i] material:材料
     * @author wangning (2185896382@qq.com)
     * @date   2024-12-03
     */
    void setMaterial(Beam* obj, const QString& material);
    /**
     * @brief  创建物理属性
     * @param[i] name 名称
     * @author wangning (2185896382@qq.com)
     * @date   2024-12-03
     */
    void createPhyscisProp(Beam* obj, const QString& name);
};

#endif

